﻿using ProgrammingEducationSystem.Models;

namespace ProgrammingEducationSystem.Services.IServices
{
    //学习资料服务
    public interface ILearnSourcesService
    {
        /// <summary>
        /// 查询所有学习资料
        /// </summary>
        /// <returns></returns>
        Task<List<LearnSource>?> AllAsync();

        /// <summary>
        /// 根据课程类型名称查找学习资料
        /// </summary>
        /// <param name="courseTypeName"></param>
        /// <returns></returns>
        Task<List<LearnSource>?> GetByCourseType(string courseTypeName);

        /// <summary>
        /// 根据课程类型Id查找学习资料
        /// </summary>
        /// <param name="courseTypeId"></param>
        /// <returns></returns>
        Task<List<LearnSource>?> GetByCourseType(Guid courseTypeId);

        /// <summary>
        /// 根据课程id列表删除学习资料
        /// </summary>
        /// <param name="courseTypeIdList"></param>
        /// <returns></returns>
        Task DeleteByCourseTypeIdList(List<Guid> courseTypeIdList);


        /// <summary>
        /// 根据id查询学习资料
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<LearnSource?> GetByIdAsync(Guid id);

        /// <summary>
        /// 删除学习资料
        /// </summary>
        /// <param name="id">学习资料Id</param>
        Task Delete(Guid id);


        /// <summary>
        /// 新增学习资料
        /// </summary>
        /// <param name="learnSource"></param>
        /// <returns></returns>
        Task AddAsync(LearnSource learnSource);

        /// <summary>
        /// 更新学习资料
        /// </summary>
        /// <param name="learnSource"></param>
        /// <returns></returns>
        void Update(LearnSource learnSource);

    }
}


//以下代码由于外键修改而废弃
///// <summary>
///// 根据课时Id查询学习资料
///// </summary>
///// <param name="id">课时Id</param>
///// <returns></returns>
//Task<List<LearnSource>?> GetByCourseHourIdAsync(Guid id);

///// <summary>
///// 根据教师Id查询学习资料
///// </summary>
///// <param name="id">教师Id</param>
///// <returns></returns>
//Task<List<LearnSource>?> GetByTeacherIdAsync(string id);

///// <summary>
///// 根据班级Id查询学习资料
///// </summary>
///// <param name="id">班级id</param>
///// <returns></returns>
//Task<List<LearnSource>?> GetByClassIdAsync(Guid id);



///// <summary>
///// 根据班级Id删除学习资料
///// </summary>
///// <param name="id">班级Id</param>
//void DeleteByClassId(Guid id);

///// <summary>
///// 根据老师Id删除学习资料
///// </summary>
///// <param name="id">老师Id</param>
//void DeleteByTeacherId(string id);

///// <summary>
///// 根据课时Id删除学习资料
///// </summary>
///// <param name="id"></param>
//void DeleteByCourseId(Guid id);
